<?php
//PingBuWang.Com
//Copyright (c) 2017~2099 http://www.pingbuwang.com All rights reserved.
namespace app\imgsrc\controller;

use mip\Mip;
use Think\Controller;
use app\common\controller\Common;
use think\Log;

class Tinyinfo extends Common{

    public function addcount(){
        $id=input('id');

        db('imgsrc')->where('id',$id)->setInc('visit_numb');

        $gg = model('Imgsrc')->getById($id);
        if($gg!=null && !empty($gg['link_url'])){
            return $this->redirect($gg['link_url']);
        }else{
            return jsonError('未能获取广告或者Link_url');
        }
    }

}